<template>
	<view :style="themeColor">
		<view class="page">
			<view class="flex flex-direction flex-wrap align-stretch benben-position-layout flex flex skill_flex_0"
				:style="{height:(176+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
				<view class='flex flex-wrap align-center justify-between skill_fd0_0'>
					<view class='flex flex-wrap align-center skill_fd0_0_c0' @tap.stop="handleJumpDiy" data-type="back"
						data-url="1">
						<text class='fu-iconfont2  skill_fd0_0_c0_c0'>&#xE794;</text>
					</view>
					<view class='flex flex-wrap align-center'>
						<text class='skill_fd0_0_c1_c0'>修改店铺</text>
					</view>
					<!-- 	<view class='flex align-center justify-end skill_fd0_0_c0' @tap.stop="throwEventFunc()">
						<text class='skill_fd0_0_c2_c0'>确定</text>
					</view> -->
					<view class='flex align-center justify-end skill_fd0_0_c0'>
					</view>
				</view>
				<view class='flex flex-wrap align-center modifyingSkills_fd0_1001'>
					<benben-input class='flex-sub modifyingSkills_fd0_1_c0001' type="text" :placeholder="`请输入店铺名称`"
						confirm-type="done" :maxlength="-1" :adjust-position='true'
						placeholder-style="color:#999;font-size:28rpx" v-model="keyword" @input="shopSearch()" />
					<text class='modifyingSkills_fd0_1_c1001' @tap.stop="shopSearches()">搜索</text>
				</view>
			</view>
			<view :style="{height: (176+StatusBarRpx)+'rpx'}"></view>
			<!---退出登录flex布局开始-->
			<benben-popup v-model="popupShow1656992350800" :mask="true" :mask-close-able="true" mode='center'>
				<view class="flex flex-direction flex-wrap align-center szsz_flex_2"
					@tap.stop="popupShow1656992350800=true">
					<text class='szsz_fd2_0'>提示</text>
					<text class='szsz_fd2_1'>确定修改入驻店铺吗？</text>
					<view class='flex flex-wrap align-center szsz_fd2_2'>
						<button class='szsz_fd2_2_c0' @tap.stop="popupShow1656992350800=false">取消</button>
						<button class='szsz_fd2_2_c1' @tap.stop="postShopFunc()">确定</button>
					</view>
				</view>
			</benben-popup>
			<!---退出登录flex布局结束-->
			<!---flex布局flex布局开始-->
			<view class="flex flex-direction flex-wrap align-stretch benben-flex-layout skill_flex_1">
				<benben-select-diy ref="showSelectPopup1692326281449"
					class-name='flex flex-direction align-stretch flex' :items.sync="shopList"
					v-model="shopData.usermerchant_id" :label.sync="shopData.store_name" default-type="aid"
					default-label="store_name" :allow-cancel='false' type="radio" :disabled='false' :max-select="-1">
					<template v-for='(item,key0) in shopList'>
						<view v-if="item.isSelected" class='flex align-center justify-between flex skill_fd1_0_c0'
							:key="key0" @tap="$refs.showSelectPopup1692326281449.tapHandle(key0)">
							<text class='flex-sub skill_fd1_0_c0_c0'>{{item.store_name}}</text>
							<image class='skill_fd1_0_c0_c1' mode="aspectFit" :src='STATIC_URL+"100.png"'></image>
						</view>
						<view v-else class='flex align-center justify-between flex skill_fd1_0_c0' :key="key0"
							@tap="$refs.showSelectPopup1692326281449.tapHandle(key0)">
							<text class='flex-sub skill_fd1_0_c0_c0'>{{item.store_name}}</text>
							<image class='skill_fd1_0_c0_c1' mode="aspectFit" :src='STATIC_URL+"101.png"'></image>
						</view>
					</template></benben-select-diy>

				<view class='flex flex-direction flex-wrap align-center modifyingSkills_fd1_1002'
					v-if="shopList.length==0">
					<image class='modifyingSkills_fd1_1_c0002' mode="widthFix" src='/static/empty/order.png'></image>
				</view>
			</view>

			<!---flex布局flex布局结束-->
			<view class="flex flex-wrap align-start justify-center benben-position-layout flex skill_flex_2001"
				v-if="shopList.length!=0">
				<button class='skill_fd2_0001' @tap.stop="popupShow1656992350800=true">确定</button>
			</view>
			<view :style="{height: '120rpx'}" v-if="shopList.length!=0"></view>

		</view>
	</view>
</template>
<script>
	import {
		validate
	} from '@/common/utils/validate.js'

	export default {
		components: {},


		data() {
			return {
				"shopList": [],
				"popupShow1656992350800": false,
				"shopData": {
					"real_name": "",
					"store_name": "",
					"status": "",
					"reson": "",
					"create_time": "",
					"usermerchant_id": ""
				},
				"id": "",
				"keyword": ""
			};
		},
		computed: {
			themeColor() {
				return this.$store.getters.themeColor
			},

		},
		watch: {},
		onLoad(options) {
			let {
				id
			} = options
			if (id !== undefined) this.id = id

		},
		onUnload() {

		},
		onReady() {

		},
		onShow() {
			this.getSkillFunc()
			this.getShopDataFunc()
		},
		onHide() {

		},
		onResize() {

		},
		onPullDownRefresh() {
			this.getSkillFunc()
		},
		onReachBottom(e) {

		},
		onPageScroll(e) {

		},
		methods: {
			shopSearch() {
				// if (!validate(this.keyword, 'require')) {
				// 	this.$message.info('请输入搜索内容');
				// 	return false;
				// }
				this.getSkillFunc()
			},
			shopSearches() {
				if (!validate(this.keyword, 'require')) {
					this.$message.info('请输入搜索内容');
					return false;
				}
				this.getSkillFunc()
			},
			//获取技能列表
			async getSkillFunc() {
				//请求方法
				//数据验证

				let datashopList = await this.$api.post(global.apiUrls.post64c1e78e9f125, {
					keyword: this.keyword
				});

				if (datashopList.data.code != 1) {
					this.$message.info(datashopList.data.msg);
					return
				}
				let infoshopList = datashopList.data;
				this.shopList = infoshopList.data

			},
			//提交店铺
			async postShopFunc() {
				if (this.shopList.length == 0) {
					this.$message.info('请选择店铺');
					return false;
				}
				//请求方法
				//数据验证

				let data665456d6208f1 = await this.$api.dbPost(global.apiUrls.post665456d6208f1, {
					usermerchant_id: this.shopData.usermerchant_id
				});
				if (!data665456d6208f1) return
				if (data665456d6208f1.data.code != 1) {
					this.$message.info(data665456d6208f1.data.msg);
					return
				}
				let info665456d6208f1 = data665456d6208f1.data;
				this.$urouter.navigateTo(`/pages/login/reviewPage/reviewPage`);
			},
			//获取店铺回显数据
			async getShopDataFunc() {
				//请求方法
				//数据验证
				let datashopData = await this.$api.get(global.apiUrls.post6654558cd6ed8, {});
				if (datashopData.data.code != 1) {
					this.$message.info(datashopData.data.msg);
					return
				}
				let infoshopData = datashopData.data;
				this.shopData = infoshopData.data
				this.shopData.usermerchant_id = this.id;
			}
		}
	};
</script>
<style lang="scss" scoped>
	.page {
		width: 100vw;
		overflow-x: hidden;
		min-height: calc(100vh - var(--window-bottom));
		background: #fff;
		background-size: 100% auto;
	}

	.skill_flex_0 {
		background: #fff;
		width: 750rpx;
		height: 176rpx;
		overflow: hidden;
		z-index: 10;
		top: 0rpx;
		background-size: 100% auto !important;
	}

	.skill_fd0_0_c2_c0 {
		color: #333333;
		font-size: 32rpx;
		font-weight: 500;
		line-height: 45rpx;
	}

	.skill_fd0_0_c1_c0 {
		font-size: 36rpx;
		font-weight: 500;
		color: #333333;
	}

	.skill_fd0_0_c0_c0 {
		font-size: 36rpx;
		color: #333;
		font-weight: 500;
	}

	.skill_fd0_0_c0 {
		width: 120rpx;
		height: 88rpx;
	}

	.skill_fd0_0 {
		padding: 0rpx 32rpx 0rpx 32rpx;
		height: 88rpx;
	}

	.skill_flex_1 {
		padding: 0rpx 32rpx 0rpx 32rpx;
		margin-bottom: 20rpx;
	}

	.skill_fd1_0_c0_c1 {
		width: 40rpx;
		height: 40rpx;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
	}

	.skill_fd1_0_c0_c0 {
		color: #333333;
		font-size: 32rpx;
		font-weight: 400;
		line-height: 45rpx;
		margin: 0rpx 24rpx 0rpx 0rpx;
		-webkit-line-clamp: 1;
		overflow: hidden;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-box-orient: vertical;
	}

	.skill_fd1_0_c0 {
		border-bottom: 1px solid #eee;
		padding: 32rpx 0rpx 32rpx 0rpx;
	}

	//底部按钮
	.skill_flex_2001 {
		width: 750rpx;
		height: 120rpx;
		overflow: hidden;
		z-index: 10;
		bottom: calc(0rpx + var(--window-bottom));
	}

	.skill_fd2_0001 {
		background: var(--benbenbgColor0);
		border-radius: 44rpx;
		width: 686rpx;
		line-height: 88rpx;
		font-size: 32rpx;
		color: #fff;
		height: 88rpx;
	}

	//弹窗样式
	.szsz_flex_2 {
		background: #fff;
		width: 540rpx;
		border-radius: 16rpx 16rpx 16rpx 16rpx;
	}

	.szsz_fd2_0 {
		font-size: 36rpx;
		font-weight: 800;
		line-height: 44rpx;
		color: #333333;
		margin: 40rpx 0rpx 40rpx 0rpx;
	}

	.szsz_fd2_1 {
		line-height: 44rpx;
		font-size: 32rpx;
		font-weight: 500;
		color: #333333;
	}

	.szsz_fd2_2_c1 {
		border-top: 1px solid #eee;
		border-left: 1px solid #eee;
		background: #fff;
		line-height: 110rpx;
		border-radius: 0rpx 0rpx 16rpx 0rpx;
		font-size: 32rpx;
		color: rgba(48, 144, 255, 1);
		width: 265rpx;
	}

	.szsz_fd2_2_c0 {
		border-top: 1px solid #eee;
		background: #fff;
		line-height: 110rpx;
		border-radius: 0rpx 0rpx 0rpx 16rpx;
		font-size: 32rpx;
		color: rgba(153, 153, 153, 1);
		padding: 0rpx 103rpx 0rpx 103rpx;
	}

	.szsz_fd2_2 {
		margin: 37rpx 0rpx 0rpx 0rpx;
	}

	.modifyingSkills_fd0_1_c1001 {
		font-size: 28rpx;
		font-weight: 400;
		color: #333;
	}

	.modifyingSkills_fd0_1_c0001 {
		font-size: 28rpx;
		font-weight: 400;
		color: #333;
		margin: 0rpx 24rpx 0rpx 0rpx;
	}

	.modifyingSkills_fd0_1001 {
		background: rgba(248, 248, 248, 1);
		background-size: 100% auto;
		border-radius: 36rpx;
		margin: 0rpx 32rpx 0rpx 32rpx;
		padding: 0rpx 24rpx 0rpx 24rpx;
		width: 686rpx;
		height: 72rpx;
	}

	.modifyingSkills_fd1_1_c0002 {
		width: 400rpx;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
	}

	.modifyingSkills_fd1_1002 {
		width: 100%;
		padding: 50rpx 0rpx 50rpx 0rpx;
	}
</style>